<template>
  <div class="app-container">
    <aside style="margin-top:15px;">
      这里使用 window.print() 来实现下载pdf的功能： 就是通过打开新页面然后重新渲染需要打印的html
    </aside>
    <router-link
      target="_blank"
      to="/pdf-download-content"
    >
      <el-button type="primary">
        点击下载 PDF
      </el-button>
    </router-link>
  </div>
</template>

<script>
export default {
  name: 'pdf'
}
</script>

<style lang="scss" scoped>
aside {
  background: #eef1f6;
  padding: 8px 24px;
  margin-bottom: 20px;
  border-radius: 2px;
  display: block;
  line-height: 32px;
  font-size: 16px;
  font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;
  color: #2c3e50;
  -webkit-font-smoothing: antialiased;
  a {
    color: #337ab7;
    cursor: pointer
  }
  a:hover {
    color: #20a0ff
  }
}
</style>
